package com.mazaiting.redeye.base.module

import android.content.Context

import com.mazaiting.easy.app.BaseApplication
import dagger.Module
import dagger.Provides

/**
 * 全局模块
 * @param context 上下文
 */
@Module
class ApplicationModule(private val context: Context) {

    /**
     * 提供 Application
     * @return BaseApplication
     */
    @Provides
    internal fun providedApplication(): BaseApplication = context.applicationContext as BaseApplication

    /**
     * 提供上下文
     * @return 上下文
     */
    @Provides
    internal fun providedContext(): Context = context
}
